<template>
    <div class="boss">
        <div class="bg">
            <div class="bgbg"></div>
            <p class="h">2021年{{monn}}中国大陆票房榜</p>
            <p class="p">当前月内中国大陆票房Top10。
                <i></i>
            </p>
            <div class="pp">
                <div class="p2">更新于2021年9月1日</div>
                <div class="more" @click="funnn()">
                    <span>查看更多榜单</span>
                    <img class="img noneBg" alt="向右箭头" src="//p0.meituan.net/scarlett/f30b7673134364efe6d9000224c8fe5f376.png@80q">
                </div>

            </div>
        </div>
        <ul>
            <li :class="{ bgColors:i==current}" v-for="(v,i) in arr" :key="i" @click="fun(i)">
                {{v.mon}}</li>

        </ul>
        <!-- <input type="text" v-model="monn"> -->
        <div class="see">看过&nbsp;0/10</div>
        <div class="list" v-for="(v,i) in arr1" :key="i">
            <div class="list-left">
                <div class="ld">
                    <p>{{i+1}}</p>
                </div>
                <img class="img image" :src="v.img | fliterImg">
            </div>
            <div class="list-right">
                <div class="movie-title">
                    <p class="movie-nm">{{v.nm}}</p>
                    <div class="movie-num">
                        {{v.label.number}}
                        <span>{{v.label.text}}</span>
                    </div>
                </div>
                <p class="movie-type">{{v.cat}}</p>
                <p class="movie-star">{{v.star}}</p>
                <p class="movie-date">{{v.pubDesc}}</p>
                <div class="movie-video">
                    <i></i>&nbsp;预告片{{v.videoCount}}个
                </div>
                <div class="movie-describe">{{v.shortDec}}</div>
                <div class="movie-buy" @click="funfun()">购票</div>
            </div>

        </div>

    </div>

</template>

<script>
import getLink from '@/api/getLink.js'

export default {
  data() {
    return {
      monn: '',
      current: 0,
      arr: [
        { mon: '8月' },
        { mon: '7月' },
        { mon: '6月' },
        { mon: '5月' },
        { mon: '4月' },
        { mon: '3月' },
        { mon: '2月' },
        { mon: '1月' }
      ],
      arr1: []
    }
  },
  mounted() {
    getLink('/api/boardAll').then(res => {
      this.arr1 = res.data
    })
  },
  methods: {
    fun(i) {
      this.current = i
    },
    funnn() {
      this.$router.push('/aggregation')
    },
    funfun() {
      this.$router.push('/seat')
    }
  }
}
</script>

<style scoped>
.boss {
  background-color: #fff;
}
.bgColors {
  background: rgba(240, 61, 55, 0.1);
  color: #f03d37;
}
.bg {
  font: 0.28rem;
  width: 100%;
  height: 3.72rem;
  overflow: hidden;
  color: #fff;
  position: relative;
  background: url('https://obj.pipi.cn/festatic/common/image/30ca9c746d723bb1a770e27f852f4537.png')
    center center / 100% 100% no-repeat;
}
.bg .bgbg {
  font: 14px/1.5 Arial, Helvetica, sans-serif;
  color: #fff;
  background: url('https://obj.pipi.cn/festatic/common/image/20b71ed5cca1e8a266ceb489bbc2f83e.png')
    center center / 100% 100% no-repeat;
  width: 128px;
  height: 48px;
  position: absolute;
  top: 0.18rem;
  left: 0px;
}
.h {
  padding-left: 0.3rem;
  padding-right: 0.3rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.44rem;
  line-height: 0.54rem;
  margin-top: 1.32rem;
  font-weight: 700;
}
.p {
  padding-left: 0.3rem;
  padding-right: 0.3rem;
  margin-top: 0.1rem;
  font-size: 0.26rem;
  line-height: 0.36rem;
  opacity: 0.7;
}
.p i {
  display: inline-block;
  vertical-align: text-top;
  width: 0.28rem;
  height: 0.28rem;
  background: url(https://obj.pipi.cn/festatic/common/image/565b7a6ad44e4bec0fb2f0c5d4a47da1.png);
  background-size: cover;
  margin-left: 0.06rem;
  margin-top: 0.02rem;
}
.pp {
  margin: 0;
  font-size: 0.26rem;
  opacity: 0.7;
  display: flex;
  justify-content: space-between;
  padding: 0 0.3rem;
  vertical-align: middle;
  margin-top: 0.2rem;
  height: 0.5rem;
  line-height: 0.48rem;
}
.p2 {
  color: #fff;
  font-size: 0.26rem;
  line-height: 0.48rem;
  opacity: 0.5;
}
.more {
  background: hsla(0, 0%, 100%, 0.1);
  border: 0.02rem solid hsla(0, 0%, 100%, 0.35);
  border-radius: 0.24rem;
  padding: 0 0.18rem;
  text-align: center;
  opacity: 0.7;
  /* font-size: .26rem; */
  vertical-align: middle;
  display: flex;
  justify-content: center;
  align-items: center;
}
.more img {
  line-height: 0.48rem;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  text-align: center;
  font-size: 0.26rem;
  color: #fff;
  font-weight: 400;
  border: 0;
  display: inline-block;
  background: none;
  width: 0.14rem;
  height: 0.2rem;
  margin-left: 0.05rem;
}
ul {
  background: #fff;
  padding: 0.3rem 0.3rem 0;
  white-space: nowrap;
  overflow: hidden;
  overflow-x: scroll;
  height: 0.8rem;
}
li {
  white-space: nowrap;
  margin: 0;
  font-weight: 400;
  font-family: PingFangSC-Regular;
  font-size: 0.24rem;
  letter-spacing: 0;
  border-radius: 0.25rem;
  padding: 0.08rem 0.24rem;
  display: inline-block;
  margin-right: 0.2rem;
  background: #f3f3f3;

  /* background: rgba(240,61,55,.1); */
  color: #333;
}
.see {
  /* padding-top: .22rem; */
  padding-left: 0.3rem;
  height: 0.46rem;
  font-size: 0.3rem;
  line-height: 0.42rem;
  color: #666;
  background: #ffffff;
}
.list {
  padding: 0.3rem;
  height: 2.76rem;
  overflow: hidden;
  display: flex;
}
.list-left {
  width: 2rem;
  height: 2.8rem;
  position: relative;
  vertical-align: middle;
  background: red;
}
.list-right {
  flex: 1;
  overflow: hidden;
  padding-left: 0.24rem;
  height: 2.8rem;
  position: relative;
  background: white;
}
.list-left div {
  position: absolute;
  top: -0.14rem;
  left: 0.1rem;
  width: 0.76rem;
  height: 0.76rem;
  background: url('https://obj.pipi.cn/festatic/common/image/fcbe4c0bdb715feb02410d875faf8102.png')
    center center / cover no-repeat;
}
.list-left div p {
  margin-top: 0.14rem;
  margin-left: 0.06rem;
  width: 0.4rem;
  height: 0.4rem;
  text-align: center;
  opacity: 0.8;
  color: #fff;
  font-size: 0.3rem;
  line-height: 0.42rem;
}
.img {
  background: #f5f5f5 no-repeat 50%;
  background-size: 50%;
  display: inline-block;
  border-radius: 0.08rem;
  width: 100%;
  height: 100%;
}
.movie-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.04rem;
  margin-bottom: 0.14rem;
}
.movie-nm {
  min-height: 0.36rem;
  font-family: PingFangSC-Medium;
  font-size: 0.36rem;
  font-weight: 700;
  line-height: 0.44rem;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.movie-num {
  font-weight: 700;
  color: #ffa016;
  font-size: 0.3rem;
  line-height: 0.36rem;
  display: flex;
  flex-shrink: 0;
  margin-left: 0.2rem;
}
.movie-num span {
  color: #ffa016;
  line-height: 0.36rem;
  padding: 0;
  margin: 0;
  font-family: PingFangSC-Medium;
  font-weight: 700;
  font-size: 0.26rem;
}
.movie-type,
.movie-star,
.movie-date {
  min-height: 0.36rem;
  font-family: PingFangSC-Regular;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 3.44rem;
  color: #999;
  font-size: 0.28rem;
  line-height: 0.36rem;
}
.movie-video {
  display: inline-flex;
  align-items: center;
  background-color: #e6f1ff;
  margin-top: 0.16rem;
  height: 0.42rem;
  padding: 0 0.12rem;
  border-radius: 0.04rem;
  color: #4f77ad;
  font-size: 0.24rem;
}
.movie-video i {
  color: #4f77ad;
  font-size: 0.24rem;
  padding: 0;
  margin: 0;
  display: inline-block;
  background: url(https://obj.pipi.cn/festatic/common/image/92e2b5f757db05cb157ce9d1e47445aa.png);
  width: 0.2rem;
  height: 0.2rem;
  background-size: cover;
}
.movie-describe {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 4rem;
  display: inline-block;
  align-items: center;
  background-color: #f9f6f2;
  margin-top: 0.1rem;
  height: 0.42rem;
  padding: 0 0.12rem;
  border-radius: 0.04rem;
  color: #a38a6b;
  font-size: 0.24rem;
  line-height: 0.42rem;
  position: absolute;
  bottom: 0;
  left: 0.24rem;
}
.movie-buy {
  height: 0.56rem;
  position: absolute;
  right: 0;
  top: 1.12rem;
  background: #ff9b4c;
  box-shadow: 0 0.04rem 0.04rem 0 #ffd3d3;
  border-radius: 0.28rem;
  width: 1.08rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.26rem;
  color: #fff;
  background-color: #ff4e48;
}
::-webkit-scrollbar {
  width: 0 !important;
}
</style>
